<div ng-controller="TargetCtrl as vm">
    <div class="row">
        <div class="col-md-12">
            <div class="box box-warning">
                <div class="box-header with-border">
                    <h3 class="box-title">Hotel Opening Training Target Review 筹开酒店培训指标评估</h3>
                    <small>(Last Updated: {{vm.lastUpdated | date:'yyyy-MM-dd HH:mm'}} by Hotel) </small>
                    <small class="text-warning">{{vm.msg}}</small>
                    <div class="pull-right">
                        <button class="btn btn-danger btn-xs " ng-disabled="vm.loading" ng-click="vm.saveTable()"><i class="fa fa-check-square-o"></i>Save</button>
                        <a class="btn btn-warning btn-xs " ng-href="/api/preopen/target/export/{{vm.hotelId}}">Export</a>
                    </div>
                </div>
                <div class="box-body table-responsive no-padding">
                    <div class="row margin">
                        <div class="col-md-12">
                            <h3>Brand Service Culture Program品牌服务行为课程 （Band 1-10）</h3>
                        </div>
                    </div>
                    <table class="table table-bordered table-condensed">
                        <tr>
                            <th width="20%">Brand</th>
                            <th width="25%">Program</th>
                            <th>Target Audience</th>
                            <th>Training Target</th>
                            <th>Messurement</th>
                            <th width="10%">Result</th>
                            <th width="10%"> Status</th>
                        </tr>
                        <tr ng-repeat="ret in vm.brand">
                            <td>{{ret.brand}}</td>
                            <td>
                                {{ret.programName}}
                            </td>
                            <td rowspan="{{vm.brand.length}}" ng-if="$index==0">
                                All employees 
                            </td>
                            <td rowspan="{{vm.brand.length}}" ng-if="$index==0">
                                {{ret.target*100|percentage}}
                            </td>
                            <td rowspan="{{vm.brand.length}}" ng-if="$index==0">
                                <p>Please provide documentation of attendance. </p>
                                <p>请提供相关培训签到记录 </p>
                                <p>Please provide 3 employees’， 3 supervisors’ and 3 managers’ training & development record.</p>
                                <p>请提供三位员工,三位主管和 三位经理的培训发展记录</p>
                            </td>
                            <td rowspan="{{vm.brand.length}}" ng-if="$index==0">
                                <div class="input-group">
                                    <input type="text" class="form-control" ng-model="ret.result" />
                                    <div class="input-group-addon">%</div>
                                </div>
                            </td>
                            <td rowspan="{{vm.brand.length}}" ng-if="$index==0">
                                <p><i ng-class="[{'fa fa-check':ret.result>=100}, {'fa fa-square-o':ret.result!=100}]"></i>Pass</p>
                                <p><i ng-class="[{'fa fa-check':ret.result!=100}, {'fa fa-square-o':ret.result==100}]"></i>Fail</p>
                            </td>
                        </tr>
                    </table>
                    <div class="row margin">
                        <div class="col-md-12">
                            <h3>General Orientation入职培训   (Band 7-10)</h3>
                        </div>
                    </div>
                    <table class="table table-bordered table-condensed">
                        <tr>
                            <th width="25%">Program</th>
                            <th width="20%">Target Audience</th>
                            <th>Training Target</th>
                            <th>Messurement</th>
                            <th width="10%">Result</th>
                            <th width="10%"> Status</th>
                        </tr>
                        <tr ng-repeat="ret in vm.gerneral">
                            <td>
                                {{ret.programName}}
                            </td>
                            <td>
                                All employees 
                            </td>
                            <td>
                                {{ret.target*100|percentage}}
                            </td>
                            <td rowspan="{{vm.gerneral.length}}" ng-if="$index==0">
                                <p>Please provide documentation of attendance. </p>
                                <p>请提供相关培训签到记录 </p>
                                <p>Please provide 3 employees’ and 3 supervisors’ orientation checklist.</p>
                                <p> 请提供三位员工和三位主管的 入职培训检查清单</p>
                            </td>
                            <td>
                                <div class="input-group">
                                    <input type="text" class="form-control" ng-model="ret.result" />
                                    <div class="input-group-addon">%</div>
                                </div>
                            </td>
                            <td>
                                <p><i ng-class="[{'fa fa-check':ret.result==100}, {'fa fa-square-o':ret.result!=100}]"></i>Pass</p>
                                <p><i ng-class="[{'fa fa-check':ret.result!=100}, {'fa fa-square-o':ret.result==100}]"></i>Fail</p>
                            </td>
                        </tr>
                    </table>
                    <div class="row margin">
                        <div class="col-md-12">
                            <h3>Management Orientation 管理层入职培训   (Band 2-6)</h3>
                        </div>
                    </div>
                    <table class="table table-bordered table-condensed">
                        <tr>
                            <th width="25%">Program</th>
                            <th width="20%">Target Audience</th>
                            <th>Training Target</th>
                            <th>Messurement</th>
                            <th width="10%">Result</th>
                            <th width="10%"> Status</th>
                        </tr>
                        <tr ng-repeat="ret in vm.managementO">
                            <td>
                                {{ret.programName}}
                            </td>
                            <td>
                                All Managers 
                            </td>
                            <td>
                                {{ret.target*100|percentage}}
                            </td>
                            <td rowspan="{{vm.managementO.length}}" ng-if="$index==0">
                                <p>Please provide documentation of attendance. </p>
                                <p>请提供相关培训签到记录 </p>
                                <p>Please provide 3 managers’ orientation checklist.</p>
                                <p> 请提供三位经理的入职培训检查清单</p>
                            </td>
                            <td>
                                <div class="input-group">
                                    <input type="text" class="form-control" ng-model="ret.result" />
                                    <div class="input-group-addon">%</div>
                                </div>
                            </td>
                            <td>
                                <p><i ng-class="[{'fa fa-check':ret.result==100}, {'fa fa-square-o':ret.result!=100}]"></i>Pass</p>
                                <p><i ng-class="[{'fa fa-check':ret.result!=100}, {'fa fa-square-o':ret.result==100}]"></i>Fail</p>
                            </td>
                        </tr>
                    </table>
                    <div class="row margin">
                        <div class="col-md-12">
                            <h3>Employee Program员工培训课程 (Band 8-10)</h3>
                        </div>
                    </div>
                    <table class="table table-bordered table-condensed">
                        <tr>
                            <th width="25%">Program</th>
                            <th width="20%">Target Audience</th>
                            <th>Training Target</th>
                            <th>Messurement</th>
                            <th width="10%">Result</th>
                            <th width="10%"> Status</th>
                        </tr>
                        <tr ng-repeat="ret in vm.employee">
                            <td>
                                {{ret.programName}}
                            </td>
                            <td>
                                {{ret.audience}}
                            </td>
                            <td>
                                {{ret.target*100|percentage}}
                            </td>
                            <td rowspan="{{vm.employee.length}}" ng-if="$index==0">
                                <p>Please provide documentation of attendance. </p>
                                <p>请提供相关培训签到记录 </p>
                                <p>Please provide craft trainers name list</p>
                                <p>请出示技能培训师名单</p>
                                <p>Please provide 3 employees’ training & development record from each department.</p>
                                <p> 请提供每个部门三名员工的 培训发展记录</p>
                            </td>
                            <td>
                                <div class="input-group">
                                    <input type="text" class="form-control" ng-model="ret.result" />
                                    <div class="input-group-addon">%</div>
                                </div>
                            </td>
                            <td>
                                <p><i ng-class="[{'fa fa-check':ret.result>=ret.target*100}, {'fa fa-square-o':ret.result<ret.target*100}]"></i>Pass</p>
                                <p><i ng-class="[{'fa fa-check':ret.result<ret.target*100}, {'fa fa-square-o':ret.result>=ret.target*100}]"></i>Fail</p>
                            </td>
                        </tr>
                    </table>
                    <div class="row margin">
                        <div class="col-md-12">
                            <h3>Supervisory Program 主管培训课程 (Band 7)</h3>
                        </div>
                    </div>
                    <table class="table table-bordered table-condensed">
                        <tr>
                            <th width="25%">Program</th>
                            <th width="20%">Target Audience</th>
                            <th>Training Target</th>
                            <th>Messurement</th>
                            <th width="10%">Result</th>
                            <th width="10%"> Status</th>
                        </tr>
                        <tr ng-repeat="ret in vm.supervisory">
                            <td>
                                {{ret.programName}}
                            </td>
                            <td>
                                {{ret.audience}}
                            </td>
                            <td>
                                {{ret.target*100|percentage}}
                            </td>
                            <td rowspan="{{vm.supervisory.length}}" ng-if="$index==0">
                                <p>Please provide documentation of attendance against supervisor name list. </p>
                                <p>请提供主管级名单及培训签到记录</p>
                                <p>Please provide 3 supervisors’ training & development record.</p>
                                <p>请提供三位主管的培训发展记录</p>
                                <p>Please provide craft trainers and group trainer name list.</p>
                                <p>请出示技能培训师和理论培训师名单</p>
                            </td>
                            <td>
                                <div class="input-group">
                                    <input type="text" class="form-control" ng-model="ret.result" />
                                    <div class="input-group-addon">%</div>
                                </div>
                            </td>
                            <td>
                                <p><i ng-class="[{'fa fa-check':ret.result>=ret.target*100}, {'fa fa-square-o':ret.result<ret.target*100}]"></i>Pass</p>
                                <p><i ng-class="[{'fa fa-check':ret.result<ret.target*100}, {'fa fa-square-o':ret.result>=ret.target*100}]"></i>Fail</p>
                            </td>
                        </tr>
                    </table>
                    <div class="row margin">
                        <div class="col-md-12">
                            <h3>Management Program经理培训课程 (Band 2-6)</h3>
                        </div>
                    </div>
                    <table class="table table-bordered table-condensed">
                        <tr>
                            <th width="25%">Program</th>
                            <th width="20%">Target Audience</th>
                            <th>Training Target</th>
                            <th>Messurement</th>
                            <th width="10%">Result</th>
                            <th width="10%"> Status</th>
                        </tr>
                        <tr ng-repeat="ret in vm.managementP">
                            <td>
                                {{ret.programName}}
                            </td>
                            <td>
                                {{ret.audience}}
                            </td>
                            <td>
                                {{ret.target*100|percentage}}
                            </td>
                            <td rowspan="{{vm.managementP.length}}" ng-if="$index==0">
                                <p>Please provide documentation of attendance against manager name list.</p>
                                <p>请提供经理级名单及培训签到记录</p>
                                <p>Please provide 3 managers’ training & development record.</p>
                                <p>请提供三位经理的培训发展记录</p>
                                <p>Please provide craft trainers name list</p>
                                <p>请出示技能培训师名单</p>
                            </td>
                            <td>
                                <div class="input-group">
                                    <input type="text" class="form-control" ng-model="ret.result" />
                                    <div class="input-group-addon">%</div>
                                </div>
                            </td>
                            <td>
                                <p><i ng-class="[{'fa fa-check':ret.result>=ret.target*100}, {'fa fa-square-o':ret.result<ret.target*100}]"></i>Pass</p>
                                <p><i ng-class="[{'fa fa-check':ret.result<ret.target*100}, {'fa fa-square-o':ret.result>=ret.target*100}]"></i>Fail</p>
                            </td>
                        </tr>
                    </table>

                    <div class="row margin">
                        <div class="col-md-12">
                            <h3>Functional Training 部门培训</h3>
                        </div>
                    </div>
                    <table class="table table-bordered table-condensed">
                        <tr>
                            <th width="25%">Program</th>
                            <th width="20%">Target Audience</th>
                            <th>Training Target</th>
                            <th>Messurement</th>
                            <th width="10%">Result</th>
                            <th width="10%"> Status</th>
                        </tr>
                        <tr ng-repeat="ret in vm.functional">
                            <td>
                                {{ret.programName}}
                            </td>
                            <td>
                                {{ret.audience}}
                            </td>
                            <td>
                                {{ret.target!='1'?ret.target:ret.target*100+'%'}}
                            </td>
                            <td rowspan="{{vm.functional.length}}" ng-if="$index==0">
                                <p>Please provide documentation of attendance against manager name list.</p>
                                <p>请提供经理级名单及培训签到记录</p>
                                <p>Please provide 3 managers’ training & development record.</p>
                                <p>请提供三位经理的培训发展记录</p>
                                <p>Please provide craft trainers name list</p>
                                <p>请出示技能培训师名单</p>
                            </td>
                            <td>
                                <div class="input-group">
                                    <input type="text" class="form-control" ng-model="ret.result" />

                                    <div ng-if="ret.target=='1'" class="input-group-addon">%</div>
                                </div>
                            </td>
                            <td>
                                <div ng-if="ret.target=='1'">
                                <p><i ng-class="[{'fa fa-check':ret.result>=ret.target*100}, {'fa fa-square-o':ret.result<ret.target*100}]"></i>Pass</p>
                                <p><i ng-class="[{'fa fa-check':ret.result<ret.target*100}, {'fa fa-square-o':ret.result>=ret.target*100}]"></i>Fail</p>
                                </div>
                                <div ng-if="ret.target!='1'">
                                <p><i ng-class="[{'fa fa-check':ret.result==ret.target}, {'fa fa-square-o':ret.result!=ret.target}]"></i>Pass</p>
                                <p><i ng-class="[{'fa fa-check':ret.result!=ret.target}, {'fa fa-square-o':ret.result==ret.target}]"></i>Fail</p>
                                </div>
                            </td>
                        </tr>
                    </table>

                    <div class="row margin">
                        <div class="col-md-12">
                            <h3>System Training 系统培训 / Vendor Training供应商培训</h3>
                        </div>
                    </div>
                    <table class="table table-bordered table-condensed">
                        <tr>
                            <th width="25%">Program</th>
                            <th width="20%">Target Audience</th>
                            <th>Training Target</th>
                            <th>Messurement</th>
                            <th width="10%">Result</th>
                            <th width="10%"> Status</th>
                        </tr>
                        <tr ng-repeat="ret in vm.system">
                            <td>
                                {{ret.programName}}
                            </td>
                            <td>
                                {{ret.audience}}
                            </td>
                            <td>
                                {{ret.target*100+'%'}}
                            </td>
                            <td rowspan="{{vm.system.length}}" ng-if="$index==0">
                                <p>Please provide documentation of attendance.</p>
                                <p>请提供相关培训签到记录</p>
                                
                            </td>
                            <td>
                                <div class="input-group">
                                    <input type="text" class="form-control" ng-model="ret.result" />
                                    <div class="input-group-addon">%</div>
                                </div>
                            </td>
                            <td>
                                <p><i ng-class="[{'fa fa-check':ret.result>=ret.target*100}, {'fa fa-square-o':ret.result<ret.target*100}]"></i>Pass</p>
                                <p><i ng-class="[{'fa fa-check':ret.result<ret.target*100}, {'fa fa-square-o':ret.result>=ret.target*100}]"></i>Fail</p>
                            </td>
                        </tr>
                    </table>

                    <div class="row margin">
                        <div class="col-md-12">
                            <h3>Review Summary 评估汇总</h3>
                        </div>
                    </div>
                    <table class="table table-bordered table-condensed">
                        <tr>
                            <th width="25%">No.</th>
                            <th>Training Target</th>
                            <th width="10%">Result</th>
                            <th width="10%"> Status</th>
                        </tr>
                        <tr ng-repeat="ret in vm.total">
                            <td>
                                {{ret.no}}
                            </td>
                            <td>
                                {{ret.target}}
                            </td>
                            <td>
                                {{ret.result}}
                            </td>
                            <td>
                                <p><i ng-class="[{'fa fa-check':ret.complete}, {'fa fa-square-o':!ret.complete}]"></i>Pass</p>
                                <p><i ng-class="[{'fa fa-check':!ret.complete}, {'fa fa-square-o':ret.complete}]"></i>Fail</p>
                            </td>
                        </tr>
                    </table>
                </div>
                <!-- /.box-body -->
            </div>
            <!-- /.box -->
        </div>
    </div>
</div>
